/*
 * $Id: ptp.h,v 1.5.2.8 Broadcom SDK $
 * 
 * $Copyright: Copyright 2011 Broadcom Corporation.
 * This program is the proprietary software of Broadcom Corporation
 * and/or its licensors, and may only be used, duplicated, modified
 * or distributed pursuant to the terms and conditions of a separate,
 * written license agreement executed between you and Broadcom
 * (an "Authorized License").  Except as set forth in an Authorized
 * License, Broadcom grants no license (express or implied), right
 * to use, or waiver of any kind with respect to the Software, and
 * Broadcom expressly reserves all rights in and to the Software
 * and all intellectual property rights therein.  IF YOU HAVE
 * NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS SOFTWARE
 * IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE
 * ALL USE OF THE SOFTWARE.  
 *  
 * Except as expressly set forth in the Authorized License,
 *  
 * 1.     This program, including its structure, sequence and organization,
 * constitutes the valuable trade secrets of Broadcom, and you shall use
 * all reasonable efforts to protect the confidentiality thereof,
 * and to use this information only in connection with your use of
 * Broadcom integrated circuit products.
 *  
 * 2.     TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS
 * PROVIDED "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES,
 * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY,
 * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE.  BROADCOM SPECIFICALLY
 * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY,
 * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES,
 * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR
 * CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING
 * OUT OF USE OR PERFORMANCE OF THE SOFTWARE.
 * 
 * 3.     TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL
 * BROADCOM OR ITS LICENSORS BE LIABLE FOR (i) CONSEQUENTIAL,
 * INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY DAMAGES WHATSOEVER
 * ARISING OUT OF OR IN ANY WAY RELATING TO YOUR USE OF OR INABILITY
 * TO USE THE SOFTWARE EVEN IF BROADCOM HAS BEEN ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGES; OR (ii) ANY AMOUNT IN EXCESS OF
 * THE AMOUNT ACTUALLY PAID FOR THE SOFTWARE ITSELF OR USD 1.00,
 * WHICHEVER IS GREATER. THESE LIMITATIONS SHALL APPLY NOTWITHSTANDING
 * ANY FAILURE OF ESSENTIAL PURPOSE OF ANY LIMITED REMEDY.$
 * 
 * DO NOT EDIT THIS FILE!
 * This file is auto-generated.
 * Edits to this file will be lost when it is regenerated.
 */

#ifndef __BCM_PTP_H__
#define __BCM_PTP_H__

#if defined(INCLUDE_PTP)

#include <bcm/types.h>

/* Miscellaneous PTP defines */
#define BCM_PTP_CLOCK_EUID_IEEE1588_SIZE    8          /* Clock EUID size per
                                                          IEEE 1588 standard. */
#define BCM_PTP_MAX_L2_HEADER_LENGTH        64         /* Maximum L2 Header
                                                          length. */
#define BCM_PTP_MAX_NETW_ADDR_SIZE          16         /* Maximum Network
                                                          Address Size. */
#define BCM_PTP_MAX_TOD_FORMAT_STRING       128        /* Maximum Network
                                                          Address Size. */

/* PTP Stack info flags */
#define BCM_PTP_STACK_WITH_ID       0x0001     /* Use the specified PTP Stack ID */
#define BCM_PTP_STACK_EXTERNAL_TOP  0x0002     /* Specifies PTP stack instance
                                                  runs on external processor */

/* PTP Clock info flags */
#define BCM_PTP_CLOCK_WITH_ID   0x0001     /* Use the specified PTP Clock ID */

/* PTP Stack ID type */
typedef int bcm_ptp_stack_id_t;

/* PTP Clock Identity type */
typedef uint8 bcm_ptp_clock_identity_t[8];

/* PTP Time of Day Format Types */
typedef enum bcm_ptp_time_type_e {
    bcmPTPTimeDefault   /* Default */
} bcm_ptp_time_type_t;

/* PTP Timesource Types */
typedef enum bcm_ptp_time_source_e {
    bcmPTPTimeSourceAtomicClock = 0x10, /* Atomic Clock */
    bcmPTPTimeSourceGPS = 0x20,         /* Global Positioning System */
    bcmPTPTimeSourceTerRadio = 0x30,    /* Terrestrial Radio */
    bcmPTPTimeSourcePtp = 0x40,         /* PTP-based source */
    bcmPTPTimeSourceNTP = 0x50,         /* Network Time Protocol source */
    bcmPTPTimeSourceHandSet = 0x60,     /* Handset */
    bcmPTPTimeSourceOther = 0x90,       /* Other timesource */
    bcmPTPTimeSourceInternalOsc = 0xA0  /* Internal Oscillator */
} bcm_ptp_time_source_t;

/* PTP Clock Accuracy */
typedef enum bcm_ptp_clock_accuracy_e {
    bcmPTPClockAccuracy25ns = 0x0020,   /* Time is accurate to with 25 ns */
    bcmPTPClockAccuracy100ns = 0x0021,  /* Time is accurate to with 100 ns */
    bcmPTPClockAccuracy250ns = 0x0022,  /* Time is accurate to with 250 ns */
    bcmPTPClockAccuracy1us = 0x0023,    /* Time is accurate to with 1 us */
    bcmPTPClockAccuracy2500ns = 0x0024, /* Time is accurate to with 2500 ns */
    bcmPTPClockAccuracy10us = 0x0025,   /* Time is accurate to with 10 us */
    bcmPTPClockAccuracy25us = 0x0026,   /* Time is accurate to with 25 us */
    bcmPTPClockAccuracy100us = 0x0027,  /* Time is accurate to with 100 us */
    bcmPTPClockAccuracy250us = 0x0028,  /* Time is accurate to with 250 us */
    bcmPTPClockAccuracy1ms = 0x0029,    /* Time is accurate to with 1 ms */
    bcmPTPClockAccuracy2500us = 0x002a, /* Time is accurate to with 2500 us */
    bcmPTPClockAccuracy10ms = 0x002b,   /* Time is accurate to with 10 ms */
    bcmPTPClockAccuracy25ms = 0x002c,   /* Time is accurate to with 25 ms */
    bcmPTPClockAccuracy100ms = 0x002d,  /* Time is accurate to with 100 ms */
    bcmPTPClockAccuracy250ms = 0x002e,  /* Time is accurate to with 250 ms */
    bcmPTPClockAccuracy1s = 0x002f,     /* Time is accurate to with 1 s */
    bcmPTPClockAccuracy10s = 0x0030,    /* Time is accurate to with 10 s */
    bcmPTPClockAccuracyL10s = 0x0031,   /* Time is accurate to > 10 s */
    bcmPTPClockAccuracyUnknown = 0x00FE, /* Time accuracy is unknown */
    bcmPTPClockAccuracyReserved = 0x00FF /* Reserved */
} bcm_ptp_clock_accuracy_t;

/* PTP callback types */
typedef enum bcm_ptp_cb_type_e {
    bcmPTPCallbackTypeManagement, 
    bcmPTPCallbackTypeEvent, 
    bcmPTPCallbackTypeSignal, 
    bcmPTPCallbackTypeFault, 
    bcmPTPCallbackCount 
} bcm_ptp_cb_type_t;

/* PTP Clock types */
typedef enum bcm_ptp_clock_type_e {
    bcmPTPClockTypeOrdinary = 1, 
    bcmPTPClockTypeBoundary = 2, 
    bcmPTPClockTypeTransparent = 3 
} bcm_ptp_clock_type_t;

/* PTP TOD Source */
typedef enum bcm_ptp_tod_source_e {
    bcmPTPTODSourceNone, 
    bcmPTPTODSourceSerial, 
    bcmPTPTODSourceEthernet, 
    bcmPTPTODSourceMaster 
} bcm_ptp_tod_source_t;

/* PTP TOD Formats */
typedef enum bcm_ptp_tod_format_e {
    bcmPTPTODFormatString, 
    bcmPTPTODFormatUBlox, 
    bcmPTPTODFormatChinaTcom, 
    bcmPTPTODFormatBCM 
} bcm_ptp_tod_format_t;

/* PTP Source Types */
typedef enum bcm_ptp_source_type_e {
    bcmPTPSourceTypeFreeRunning, 
    bcmPTPSourceTypePTP, 
    bcmPTPSourceTypeGenericTimestamp, 
    bcmPTPSourceTypeGpsTimestamp, 
    bcmPTPSourceTypeSyncETimestamp, 
    bcmPTPSourceTypeT1Timestamp, 
    bcmPTPSourceTypeE1Timestamp 
} bcm_ptp_source_type_t;

/* PTP Timestamp Source */
typedef int bcm_ptp_timestamp_source_t;

/* PTP Delay Mechanism types */
typedef enum bcm_ptp_delay_mechanism_e {
    bcmPTPDelayMechanismEnd2End = 1, 
    bcmPTPDelayMechanismPeer2Peer = 2, 
    bcmPTPDelayMechansimDisabled = 0xFE 
} bcm_ptp_delay_mechanism_t;

/* PTP Timestamp type */
typedef struct bcm_ptp_timestamp_s {
    uint64 seconds;     /* Seconds */
    uint32 nanoseconds; /* Nanoseconds */
} bcm_ptp_timestamp_t;

typedef struct bcm_ptp_cb_types_s {
    SHR_BITDCL w[_SHR_BITDCLSIZE(bcmPTPCallbackCount)]; 
} bcm_ptp_cb_types_t;

/* Callback function type for PTP */
typedef int (*bcm_ptp_cb)(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    uint32 flags, 
    bcm_ptp_cb_type_t type, 
    uint32 length, 
    uint8 *data, 
    void *user_data);

typedef int (*bcm_ptp_ext_stack_io_wr_fn_ptr)(
    void *cookie, 
    uint32 address, 
    uint32 value);

typedef int (*bcm_ptp_ext_stack_io_rd_fn_ptr)(
    void *cookie, 
    uint32 address, 
    uint32 *value);

/* PTP External Stack Processor Info object */
typedef struct bcm_ptp_external_stack_info_s {
    uint16 ethertype;                   /* RCPU ethertype */
    uint16 signature;                   /* RCPU signature */
    uint16 tpid;                        /* RCPU tpid */
    uint16 vlan;                        /* RCPU vlan */
    uint8 vlan_pri;                     /* VLAN priority. External Stack
                                           Processor Only. */
    uint16 reflected_ethertype;         /* RCPU reflected ethertype */
    bcm_mac_t switch_mac;               /* Switch MAC address */
    bcm_mac_t host_mac;                 /* Host MAC address. External Stack
                                           Processor Only. */
    bcm_mac_t top_mac;                  /* ToP stack MAC address. External Stack
                                           Processor Only. */
    bcm_ip_t host_ip_addr;              /* host IPv4 address. External Stack
                                           Processor Only. */
    bcm_ip_t top_ip_addr;               /* ToP IPv4 address. External Stack
                                           Processor Only. */
    bcm_port_t port;                    /* ToP port. External Stack Processor
                                           Only. */
    bcm_ptp_ext_stack_io_rd_fn_ptr read_fn; /* PCI Read Function */
    bcm_ptp_ext_stack_io_wr_fn_ptr write_fn; /* PCI Write Function */
    void *cookie;                       /* User-specified identifer for external
                                           stack */
} bcm_ptp_external_stack_info_t;

/* PTP Stack Info object */
typedef struct bcm_ptp_stack_info_s {
    uint32 flags;                       /* control flags */
    bcm_ptp_stack_id_t id;              /* PTP stack identifier */
    bcm_ptp_external_stack_info_t *ext_stack_info; /* External Stack Info. External Stack
                                           Processor Only. */
} bcm_ptp_stack_info_t;

/* Clock Quality */
typedef struct bcm_ptp_clock_quality_s {
    uint8 clock_class;                  /* Clock Class */
    bcm_ptp_clock_accuracy_t clock_accuracy; /* Clock Accuracy */
    uint16 offset_scaled_log_variance;  /* Offset Scaled Log Variance */
} bcm_ptp_clock_quality_t;

/* PTP Port Identity Structure */
typedef struct bcm_ptp_port_identity_s {
    bcm_ptp_clock_identity_t clock_identity; /* Clock Identity */
    uint16 port_number;                 /* Port Number */
} bcm_ptp_port_identity_t;

/* Clock Instance Information */
typedef struct bcm_ptp_clock_info_s {
    uint32 flags;                       /* Flags */
    int clock_num;                      /* Clock Identifier (numeric) */
    bcm_ptp_clock_identity_t clock_identity; /* Clock Identity */
    bcm_ptp_clock_type_t type;          /* PTP Clock Type */
    uint16 num_ports;                   /* Number of Ports */
    uint8 class;                        /* Clock Class */
    uint8 domain_number;                /* Domain Number */
    uint16 scaled_log_variance;         /* Scaled Log Variance */
    uint8 priority1;                    /* Priority 1 */
    uint8 priority2;                    /* Priority 2 */
    uint8 slaveonly;                    /* Slave Only */
    uint8 twostep;                      /* Two Step */
    uint8 tc_primary_domain;            /* Transparent Clock Primary Domain */
    bcm_ptp_delay_mechanism_t tc_delay_mechanism; /* Transparent Clock Delay Mechanism */
    uint8 announce_receipt_timeout_minimum; /* Announce Receipt Timeout Minimum */
    uint8 announce_receipt_timeout_default; /* Announce Receipt Timeout Default */
    uint8 announce_receipt_timeout_maximum; /* Announce Receipt Timeout Maximum */
    int log_announce_interval_minimum;  /* Log Announce Interval Minimum */
    int log_announce_interval_default;  /* Log Announce Interval Default */
    int log_announce_interval_maximum;  /* Log Announce Interval Maximum */
    int log_sync_interval_minimum;      /* Log Sync Interval Minimum */
    int log_sync_interval_default;      /* Log Sync Interval Default */
    int log_sync_interval_maximum;      /* Log Sync Interval Maximum */
    int log_min_delay_req_interval_minimum; /* Log min PDelay request interval or
                                           log min delay request interval
                                           minimum */
    int log_min_delay_req_interval_default; /* Log min PDelay request interval or
                                           log min delay request interval
                                           default */
    int log_min_delay_req_interval_maximum; /* Log min PDelay request interval or
                                           log min delay request interval
                                           maximum */
    uint8 domain_number_minimum;        /* Domain Number minimum */
    uint8 domain_number_default;        /* Domain Number default */
    uint8 domain_number_maximum;        /* Domain Number maximum */
    uint8 priority1_minimum;            /* Priority 1 minimum */
    uint8 priority1_default;            /* Priority 1 default */
    uint8 priority1_maximum;            /* Priority 1 maximum */
    uint8 priority2_minimum;            /* Priority 2 minimum */
    uint8 priority2_default;            /* Priority 2 default */
    uint8 priority2_maximum;            /* Priority 2 maximum */
    uint8 number_virtual_interfaces;    /* Number of virtual interfaces */
} bcm_ptp_clock_info_t;

/* PTP Clock Dataset flags */
#define BCM_PTP_DATASET_TWOSTEP_ONLY    0x0001     /* Specifies Two-step only */
#define BCM_PTP_DATASET_SLAVE_ONLY      0x0002     /* Specifies Slave Only */

/* PTP Default Dataset */
typedef struct bcm_ptp_default_dataset_s {
    uint32 flags;                       /* Flags */
    uint16 number_ports;                /* Number of ports */
    uint8 priority1;                    /* Priority 1 */
    uint8 priority2;                    /* Priority 2 */
    uint8 domain_number;                /* Domain number */
    bcm_ptp_clock_quality_t clock_quality; /* Clock quality */
    bcm_ptp_clock_identity_t clock_identity; /* Clock Identity */
} bcm_ptp_default_dataset_t;

/* PTP Current Dataset */
typedef struct bcm_ptp_current_dataset_s {
    uint16 steps_removed;       /* Steps Removed from Master */
    uint64 offset_from_master;  /* Offset from Master in nanoseconds */
    uint64 mean_path_delay;     /* Mean Path Delay in nanoseconds */
} bcm_ptp_current_dataset_t;

/* PTP Parent Dataset */
typedef struct bcm_ptp_parent_dataset_s {
    bcm_ptp_port_identity_t parent_port_identity; /* Parent Port Identity */
    uint8 ps;                           /* ps */
    uint16 observed_parent_offset_scaled_log_variance; /* Observed Parent Offset Scaled Log
                                           Variance */
    uint32 observed_parent_clock_phase_change_rate; /* Observed Parent Clock Phase Change
                                           Rate */
    uint8 grandmaster_priority1;        /* Grandmaster Priority 1 */
    bcm_ptp_clock_quality_t grandmaster_clock_quality; /* Grandmaster Clock quality */
    uint8 grandmaster_priority2;        /* Grandmaster Priority 2 */
    bcm_ptp_clock_identity_t grandmaster_identity; /* Grandmaster Identity */
} bcm_ptp_parent_dataset_t;

/* PTP Transparent Clock Default Dataset */
typedef struct bcm_ptp_transparent_clock_default_dataset_s {
    bcm_ptp_clock_identity_t clock_identity; /* Clock Identity */
    uint16 number_ports;                /* Number Of Ports */
    uint8 delay_mechanism;              /* Delay Mechanism */
    uint8 primary_domain;               /* Primary Domain */
} bcm_ptp_transparent_clock_default_dataset_t;

/* PTP Transparent Clock Default Dataset */
typedef struct bcm_ptp_transparent_clock_port_dataset_s {
    bcm_ptp_port_identity_t port_identity; /* Clock Port identity */
    uint8 faulty;                       /* Faulty */
    int log_min_pdelay_req_interval;    /* Log Minimun Peer Delay Interval */
    uint64 peer_mean_path_delay;        /* Peer Mean Path Delay in Nanoseconds */
} bcm_ptp_transparent_clock_port_dataset_t;

/* Coordinated Universal Time (UTC) dataset definiton */
typedef struct bcm_ptp_utc_s {
    uint16 utc_offset;  /* Current UTC offset */
    uint8 leap61;       /* 1-> Plus one second, 0-> No leap second. */
    uint8 leap59;       /* 1-> Minus one second, 0-> No leap second. */
    uint8 utc_valid;    /* 1-> Correct offset to UTC, 0-> No sync to UTC. */
} bcm_ptp_utc_t;

/* Clock data traceability */
typedef struct bcm_ptp_trace_s {
    uint8 time_traceable;       /* Time traceable */
    uint8 frequency_traceable;  /* Frequency traceable */
} bcm_ptp_trace_t;

/* PTP Timescale properties */
typedef struct bcm_ptp_timescale_s {
    bcm_ptp_time_source_t time_source;  /* PTP time source */
    uint8 ptp_timescale;                /* PTP timescale */
} bcm_ptp_timescale_t;

/* PTP Time Properties Dataset */
typedef struct bcm_ptp_time_properties_s {
    bcm_ptp_utc_t utc_info;             /* UTC properties */
    bcm_ptp_trace_t trace_info;         /* Trace properties */
    bcm_ptp_timescale_t timescale_info; /* Timescale properties */
} bcm_ptp_time_properties_t;

/* PTP Network Protocol enumeration (See IEEE 1588, Chapter 7.4.1) */
typedef enum bcm_ptp_protocol_e {
    bcmPTPUDPIPv4 = 1,  /* Ethernet / UDP / IPv4 */
    bcmPTPUDPIPv6 = 2,  /* Ethernet / UDP / IPv6 */
    bcmPTPIEEE8023 = 3  /* Ethernet Layer 2 */
} bcm_ptp_protocol_t;

/* PTP Clock Port Type enumeration. */
typedef enum bcm_ptp_port_type_e {
    bcmPTPPortTypeStandard = 1,     /* Master-or-Slave port type */
    bcmPTPPortTypeMasterOnly = 2,   /* Master-only port type */
    bcmPTPPortTypeSlaveOnly = 3     /* Slave-only port type */
} bcm_ptp_port_type_t;

/* PTP Timestamp Source enumeration. */
typedef enum bcm_ptp_timestamp_mechanism_e {
    bcmPTPToPTimestamps = 1,            /* Internal ToP timestamps */
    bcmPTPRCPUTimestamps = 2,           /* Timestamps from switch */
    bcmPTPPhyCorrectionTimestamps = 3   /* Timestamps from PHY */
} bcm_ptp_timestamp_mechanism_t;

/* PTP Clock Port address */
typedef struct bcm_ptp_clock_port_address_s {
    bcm_ptp_protocol_t addr_type;       /* Clock Port address type */
    uint8 address[BCM_PTP_MAX_NETW_ADDR_SIZE]; /* Address */
} bcm_ptp_clock_port_address_t;

/* PTP Clock Port information */
typedef struct bcm_ptp_clock_port_info_s {
    bcm_ptp_clock_port_address_t port_address; /* Clock Port address */
    bcm_mac_t mac;                      /* MAC address */
    uint8 multicast_l2_size;            /* Multicast L2 header size (octets) */
    uint8 multicast_l2[BCM_PTP_MAX_L2_HEADER_LENGTH]; /* Multicast L2 header */
    uint8 multicast_pdelay_l2_size;     /* Multicast Peer-Delay L2 header size
                                           (octets) */
    uint8 multicast_pdelay_l2[BCM_PTP_MAX_L2_HEADER_LENGTH]; /* Multicast Peer-Delay L2 header */
    uint8 multicast_tx_enable;          /* Multicast transmit enable */
    bcm_ptp_port_type_t port_type;      /* Port Type */
    uint8 announce_receipt_timeout;     /* Announce receipt timeout */
    int log_announce_interval;          /* Log Announce interval */
    int log_sync_interval;              /* Log Sync interval */
    int log_min_delay_req_interval;     /* Log Minimum Delay Request interval */
    bcm_ptp_delay_mechanism_t delay_mechanism; /* Delay Mechanism */
    bcm_ptp_timestamp_mechanism_t rx_timestamp_mechanism; /* Receive Timestamp Mechanism */
    uint16 rx_packets_vlan;             /* Port Rx Packets Vlan */
    uint32 rx_packets_port_mask_high32; /* Port Rx Packets Mask High bits */
    uint32 rx_packets_port_mask_low32;  /* Port Rx Packets Mask Low bits */
    uint8 rx_packets_criteria_mask;     /* Port Rx Packets Criteria Mask */
} bcm_ptp_clock_port_info_t;

/* PTP Clock Port Dataset */
typedef struct bcm_ptp_port_dataset_s {
    bcm_ptp_port_identity_t port_identity; /* Clock Port identity */
    uint8 port_state;                   /* Port state. */
    int log_min_delay_req_interval;     /* Log minimum delay request interval */
    uint64 peer_mean_path_delay;        /* Peer Mean path delay (nanoseconds) */
    int log_announce_interval;          /* Log Announce interval */
    uint8 announce_receipt_timeout;     /* Announce receipt timeout */
    int log_sync_interval;              /* Log synchronization interval */
    uint8 delay_mechanism;              /* Delay Mechanism */
    int log_min_pdelay_req_interval;    /* Log minimum peer delay request
                                           interval */
    uint8 version_number;               /* Version Number */
} bcm_ptp_port_dataset_t;

/* PTP Clock Peer address */
typedef struct bcm_ptp_clock_peer_address_s {
    uint8 raw_l2_header_length;         /* Raw L2 Header Length */
    uint8 raw_l2_header[BCM_PTP_MAX_L2_HEADER_LENGTH]; /* Raw L2 Header */
    bcm_ptp_protocol_t addr_type;       /* Peer Port address type */
    bcm_ip_t ipv4_addr;                 /* Peer IPv4 address */
    bcm_ip6_t ipv6_addr;                /* Peer IPv6 address */
} bcm_ptp_clock_peer_address_t;

/* PTP Peer Info Structure */
typedef struct bcm_ptp_clock_peer_s {
    bcm_ptp_clock_identity_t clock_identity; /* Clock Identity */
    uint16 remote_port_number;          /* Remote Clock Port Number */
    uint16 local_port_number;           /* Local Clock Port Number */
    bcm_ptp_clock_peer_address_t peer_address; /* Peer Port address */
    bcm_ptp_timestamp_mechanism_t tx_timestamp_mech; /* Send Timestamp Mechanism */
    int log_peer_delay_request_interval; /* Log Peer Delay Request Interval */
    int log_sync_interval;              /* Log Sync Interval */
    int announce_receive_timeout;       /* Announce Receive Timeout */
    int log_announce_interval;          /* Log Announce Interval */
    int log_delay_request_interval;     /* Log Delay Request Interval */
    uint8 delay_mechanism;              /* Delay Mechanism */
} bcm_ptp_clock_peer_t;

/* PTP Peer Unicast Master Entry */
typedef struct bcm_ptp_clock_unicast_master_s {
    int log_sync_interval;              /* PTP Clock Log Sync Interval */
    int log_min_delay_request_interval; /* PTP Clock Log Minimun Delay Request
                                           Interval */
    bcm_ptp_clock_peer_address_t address; /* PTP Clock Master address */
} bcm_ptp_clock_unicast_master_t;

/* PTP TOD IN */
typedef struct bcm_ptp_tod_input_s {
    bcm_ptp_tod_source_t source;        /* PTP TOD Source */
    bcm_ptp_clock_peer_address_t peer_address; /* Peer Address For TOD Over Ethernet */
    uint32 tod_offset_ns;               /* PTP Offset Added in Nanoseconds */
    bcm_ptp_tod_format_t format;        /* PTP TOD Format */
    uint8 format_str[BCM_PTP_MAX_TOD_FORMAT_STRING]; /* PTP Format String (null terminated) */
    uint8 mask_str[BCM_PTP_MAX_TOD_FORMAT_STRING]; /* PTP Mask String (null terminated) */
} bcm_ptp_tod_input_t;

/* PTP TOD Channel */
typedef struct bcm_ptp_channel_s {
    bcm_ptp_source_type_t type;         /* PTP Channel Source Type */
    bcm_ptp_timestamp_source_t source;  /* PTP Channel Timestamp Source */
    int frequency;                      /* PTP Channel Frequency */
    int tod_index;                      /* PTP Channel Index */
    int freq_priority;                  /* PTP Channel Frequency Priority */
    int freq_enabled;                   /* PTP Channel Frequency Enabled */
    int time_prio;                      /* PTP Channel Time Priority */
    int time_enabled;                   /* PTP Channel Time Enabled */
    int freq_assumed_QL;                /* PTP Channel Requency Assumed QL */
    int time_assumed_QL;                /* PTP Channel Time Assumed QL */
    int assumed_QL_enabled;             /* PTP Channel Assumed QL Enabled */
    int resolution;                     /* PTP Channel Resolution */
} bcm_ptp_channel_t;

/* PTP GPIO PIN */
typedef int bcm_ptp_gpio_pin_t;

/* PTP Signal Out */
typedef struct bcm_ptp_signal_output_s {
    bcm_ptp_gpio_pin_t pin; /* PTP Signal GPIO pin */
    int frequency;          /* PTP Signal Frequency */
    int phase_lock;         /* PTP Phase Lock */
    int pulse_width_ns;     /* PTP Pulse Width */
    int pulse_offset_ns;    /* PTP Pulse Offset */
} bcm_ptp_signal_output_t;

/* PTP TOD OUT */
typedef struct bcm_ptp_tod_output_s {
    bcm_ptp_tod_source_t source;        /* PTP TOD Source */
    bcm_ptp_clock_peer_address_t peer_address; /* Peer Address For TOD Over Ethernet */
    uint32 tod_offset_ns;               /* PTP Offset Added in Nanoseconds */
    uint32 tod_delay_ns;                /* PTP Delay Added in Nanoseconds */
    bcm_ptp_tod_format_t format;        /* PTP TOD Format */
    int frequency;                      /* PTP Signal Frequency */
    int format_str_len;                 /* PTP Format String Length */
    uint8 format_str[BCM_PTP_MAX_TOD_FORMAT_STRING]; /* PTP Format String (null terminated) */
} bcm_ptp_tod_output_t;

/* PTP Timesource Status */
typedef struct bcm_ptp_timesource_status_s {
    int *tod_status;        /* PTP Timesource TOD Status */
    int *phase_status;      /* PTP Timesource Phase Status */
    int *frequency_status;  /* PTP Timesource Frequency Status */
} bcm_ptp_timesource_status_t;

#ifndef BCM_HIDE_DISPATCHABLE

/* Initialize the PTP subsystem */
extern int bcm_ptp_init(
    int unit);

/* Shut down the PTP subsystem */
extern int bcm_ptp_detach(
    int unit);

/* Create a PTP stack instance */
extern int bcm_ptp_stack_create(
    int unit, 
    bcm_ptp_stack_info_t *ptp_info);

/* Set Time Of Day format for PTP stack instance. */
extern int bcm_ptp_time_format_set(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    bcm_ptp_time_type_t type);

/* Register a callback for handling PTP */
extern int bcm_ptp_cb_register(
    int unit, 
    bcm_ptp_cb_types_t cb_types, 
    bcm_ptp_cb cb, 
    void *user_data);

/* Unregister a callback for handling PTP */
extern int bcm_ptp_cb_unregister(
    int unit, 
    bcm_ptp_cb_types_t cb_types, 
    bcm_ptp_cb cb);

/* Create PTP Clock instance. */
extern int bcm_ptp_clock_create(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    bcm_ptp_clock_info_t *clock_info);

/* Get PTP Clock instance information. */
extern int bcm_ptp_clock_get(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    bcm_ptp_clock_info_t *clock_info);

/* Set PTP Clock instance user description. */
extern int bcm_ptp_clock_user_description_set(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    uint8 *desc);

/* Get PTP Clock instance default dataset. */
extern int bcm_ptp_clock_default_dataset_get(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    bcm_ptp_default_dataset_t *dataset);

/* Get PTP Clock instance current dataset. */
extern int bcm_ptp_clock_current_dataset_get(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    bcm_ptp_current_dataset_t *dataset);

/* Get PTP Clock instance parent dataset. */
extern int bcm_ptp_clock_parent_dataset_get(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    bcm_ptp_parent_dataset_t *dataset);

/* Get PTP Clock instance time properties. */
extern int bcm_ptp_clock_time_properties_get(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    bcm_ptp_time_properties_t *data);

/* Get PTP Clock priority 1. */
extern int bcm_ptp_clock_priority1_get(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    uint32 *priority1);

/* Set PTP Clock priority 1. */
extern int bcm_ptp_clock_priority1_set(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    uint32 priority1);

/* Get PTP Clock priority 2. */
extern int bcm_ptp_clock_priority2_get(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    uint32 *priority2);

/* Set PTP Clock priority 2. */
extern int bcm_ptp_clock_priority2_set(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    uint32 priority2);

/* Get PTP Clock domain. */
extern int bcm_ptp_clock_domain_get(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    uint32 *domain);

/* Set PTP Clock domain. */
extern int bcm_ptp_clock_domain_set(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    uint32 domain);

/* Get PTP Clock slave only. */
extern int bcm_ptp_clock_slaveonly_get(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    uint32 *slaveonly);

/* Set PTP Clock slave only. */
extern int bcm_ptp_clock_slaveonly_set(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    uint32 slaveonly);

/* Get PTP Clock Accuracy info. */
extern int bcm_ptp_clock_accuracy_get(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    bcm_ptp_clock_accuracy_t *accuracy);

/* Set PTP Clock Accuracy info. */
extern int bcm_ptp_clock_accuracy_set(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    bcm_ptp_clock_accuracy_t *accuracy);

/* Get PTP Clock Time. */
extern int bcm_ptp_clock_time_get(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    bcm_ptp_timestamp_t *time);

/* Set PTP Clock Time. */
extern int bcm_ptp_clock_time_set(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    bcm_ptp_timestamp_t *time);

/* Get PTP Clock Timescale info. */
extern int bcm_ptp_clock_timescale_get(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    bcm_ptp_timescale_t *timescale);

/* Set PTP Clock Timescale info. */
extern int bcm_ptp_clock_timescale_set(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    bcm_ptp_timescale_t *timescale);

/* Get PTP Clock Traceability info. */
extern int bcm_ptp_clock_traceability_get(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    bcm_ptp_trace_t *trace);

/* Set PTP Clock Traceability info. */
extern int bcm_ptp_clock_traceability_set(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    bcm_ptp_trace_t *trace);

/* Get PTP Clock UTC info. */
extern int bcm_ptp_clock_utc_get(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    bcm_ptp_utc_t *utc);

/* Set PTP Clock UTC info. */
extern int bcm_ptp_clock_utc_set(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    bcm_ptp_utc_t *utc);

/* Configure PTP Clock Port information. */
extern int bcm_ptp_clock_port_configure(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    uint32 clock_port, 
    bcm_ptp_clock_port_info_t *info);

/* Get PTP Clock Port Identity. */
extern int bcm_ptp_clock_port_identity_get(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    uint32 clock_port, 
    bcm_ptp_port_identity_t *identity);

/* Get PTP Clock Port Type. */
extern int bcm_ptp_clock_port_type_get(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    uint32 clock_port, 
    bcm_ptp_port_type_t *type);

/* Get PTP Clock Port Protocol. */
extern int bcm_ptp_clock_port_protocol_get(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    uint32 clock_port, 
    bcm_ptp_protocol_t *protocol);

/* Get PTP Clock Port MAC Address. */
extern int bcm_ptp_clock_port_mac_get(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    uint32 clock_port, 
    bcm_mac_t *mac);

/* Get PTP Clock Port Information. */
extern int bcm_ptp_clock_port_info_get(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    uint32 clock_port, 
    bcm_ptp_clock_port_info_t *info);

/* Get PTP Clock Port Dataset Information. */
extern int bcm_ptp_clock_port_dataset_get(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    uint32 clock_port, 
    bcm_ptp_port_dataset_t *dataset);

/* Get PTP Clock Port Delay Mechanism. */
extern int bcm_ptp_clock_port_delay_mechanism_get(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    uint32 clock_port, 
    uint32 *delay_mechanism);

/* Set PTP Clock Port Delay Mechanism. */
extern int bcm_ptp_clock_port_delay_mechanism_set(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    uint32 clock_port, 
    uint32 delay_mechanism);

/* Set PTP Clock Port Latency. */
extern int bcm_ptp_clock_port_latency_set(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    uint32 clock_port, 
    uint32 latency_in, 
    uint32 latency_out);

/* Set PTP Clock Port Log Announce Interval. */
extern int bcm_ptp_clock_port_log_announce_interval_set(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    uint32 clock_port, 
    int interval);

/* Get PTP Clock Port Log Announce interval. */
extern int bcm_ptp_clock_port_log_announce_interval_get(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    uint32 clock_port, 
    int *interval);

/* Get PTP Clock Port Announce Receipt Timeout. */
extern int bcm_ptp_clock_port_announce_receipt_timeout_get(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    uint32 clock_port, 
    uint32 *timeout);

/* Set PTP Clock Port Announce Receipt Timeout. */
extern int bcm_ptp_clock_port_announce_receipt_timeout_set(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    uint32 clock_port, 
    uint32 timeout);

/* Get PTP Clock Port Log Sync Interval. */
extern int bcm_ptp_clock_port_log_sync_interval_get(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    uint32 clock_port, 
    int *interval);

/* Set PTP Clock Port Log Sync Interval. */
extern int bcm_ptp_clock_port_log_sync_interval_set(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    uint32 clock_port, 
    int interval);

/* Get PTP Clock Port Version Number. */
extern int bcm_ptp_clock_port_version_number_get(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    uint32 clock_port, 
    uint32 *version);

/* Get PTP Clock Port Log Min PDelay Request Interval. */
extern int bcm_ptp_clock_port_log_min_pdelay_req_interval_get(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    uint32 clock_port, 
    int *interval);

/* Set PTP Clock Port Log Min Peer Delay Request Interval. */
extern int bcm_ptp_clock_port_log_min_pdelay_req_interval_set(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    uint32 clock_port, 
    int interval);

/* Get PTP Clock Port Log Min Delay Request Interval. */
extern int bcm_ptp_clock_port_log_min_delay_req_interval_get(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    uint32 clock_port, 
    int *interval);

/* Set PTP Clock Port Log Min Delay Request Interval. */
extern int bcm_ptp_clock_port_log_min_delay_req_interval_set(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    uint32 clock_port, 
    int interval);

/* Enable PTP Clock Port. */
extern int bcm_ptp_clock_port_enable(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    uint32 clock_port);

/* Disable PTP Clock Port. */
extern int bcm_ptp_clock_port_disable(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    uint32 clock_port);

/* Add PTP Clock Unicast Slave */
extern int bcm_ptp_unicast_slave_add(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    int port_num, 
    bcm_ptp_clock_peer_t *slave_info);

/* List PTP Clock Unicast Slaves */
extern int bcm_ptp_unicast_slave_list(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    int port_num, 
    int *num_slaves, 
    bcm_ptp_clock_peer_t *slave_info);

/* Remove PTP Clock Unicast Slave */
extern int bcm_ptp_unicast_slave_remove(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    int port_num, 
    bcm_ptp_clock_peer_t *slave_info);

/* Clear All PTP Clock Unicast Slaves */
extern int bcm_ptp_unicast_slave_clear(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    int port_num);

/* Get PTP Clock Unicast Master Table Size */
extern int bcm_ptp_unicast_master_table_size_get(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    int port_num, 
    int *max_table_entries);

/* Add PTP Clock Unicast Master Table Entry */
extern int bcm_ptp_unicast_master_table_add(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    int port_num, 
    bcm_ptp_clock_unicast_master_t *master_info);

/* List PTP Unicast Master Table */
extern int bcm_ptp_unicast_master_table_list(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    int port_num, 
    int *num_masters, 
    bcm_ptp_clock_peer_address_t *master_addr);

/* Remove PTP Clock Unicast Master Table Entry */
extern int bcm_ptp_unicast_master_table_remove(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    int port_num, 
    bcm_ptp_clock_peer_address_t *master_info);

/* Clear PTP Clock Unicast Master Table */
extern int bcm_ptp_unicast_master_table_clear(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    int port_num);

/* Get PTP Clock Acceptable Master Table Size */
extern int bcm_ptp_acceptable_master_table_size_get(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    int port_num, 
    int *max_table_entries);

/* Add PTP Clock Acceptable Master Table Entry */
extern int bcm_ptp_acceptable_master_table_add(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    int port_num, 
    int priority1_alt_value, 
    bcm_ptp_clock_peer_address_t *master_info);

/* List PTP Acceptable Master Table */
extern int bcm_ptp_acceptable_master_table_list(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    int port_num, 
    int *num_masters, 
    bcm_ptp_clock_peer_address_t *master_addr);

/* Remove PTP Clock Acceptable Master Table Entry */
extern int bcm_ptp_acceptable_master_table_remove(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    int port_num, 
    bcm_ptp_clock_peer_address_t *master_info);

/* Clear PTP Clock Acceptable Master Table */
extern int bcm_ptp_acceptable_master_table_clear(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    int port_num);

/* Get PTP Clock Acceptable Master Table Enabled state */
extern int bcm_ptp_acceptable_master_table_enabled_get(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    int port_num, 
    uint8 *enabled);

/* Set PTP Clock Acceptable Master Table Enabled state */
extern int bcm_ptp_acceptable_master_table_enabled_set(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    int port_num, 
    uint8 enabled);

/* Get PTP Clock Primary Domain */
extern int bcm_ptp_primary_domain_get(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    int *primary_domain);

/* Set PTP Clock Primary Domain */
extern int bcm_ptp_primary_domain_set(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    int primary_domain);

/* Get PTP Transparent Clock Default Dataset */
extern int bcm_ptp_transparent_clock_default_dataset_get(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    bcm_ptp_transparent_clock_default_dataset_t *data_set);

/* Get PTP Transparent Clock Port Dataset */
extern int bcm_ptp_transparent_clock_port_dataset_get(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    uint16 clock_port, 
    bcm_ptp_transparent_clock_port_dataset_t *data_set);

/* Set PTP TOD Input Sources */
extern int bcm_ptp_tod_input_sources_set(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    int num_tod_sources, 
    bcm_ptp_tod_input_t *tod_sources);

/* Get PTP Input Timesource Status */
extern int bcm_ptp_timesource_input_status_get(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    bcm_ptp_timesource_status_t *status);

/* Get PTP TOD Input Sources */
extern int bcm_ptp_tod_input_sources_get(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    int num_tod_sources, 
    bcm_ptp_tod_input_t *tod_sources);

/* Set PTP Input Channels */
extern int bcm_ptp_input_channels_set(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    int num_channels, 
    bcm_ptp_channel_t *channels);

/* Set PTP Input Channels Precedence Mode */
extern int bcm_ptp_input_channel_precedence_mode_set(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    int channel_select_mode);

/* Set PTP Input Channels Switching Mode */
extern int bcm_ptp_input_channel_switching_mode_set(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    int channel_switching_mode);

/* Set PTP TOD Output */
extern int bcm_ptp_tod_output_set(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    int *tod_output_id, 
    bcm_ptp_tod_output_t *output_info);

/* Get PTP TOD Output */
extern int bcm_ptp_tod_output_get(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    int *tod_output_count, 
    bcm_ptp_tod_output_t *tod_output_id);

/* Remove PTP TOD Output */
extern int bcm_ptp_tod_output_remove(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    int tod_output_id);

/* Set PTP Signal Output */
extern int bcm_ptp_signal_output_set(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    int *signal_output_id, 
    bcm_ptp_signal_output_t *output_info);

/* Get PTP Signal Output */
extern int bcm_ptp_signal_output_get(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    int *signal_output_count, 
    bcm_ptp_signal_output_t *signal_output_id);

/* Remove PTP Signal Output */
extern int bcm_ptp_signal_output_remove(
    int unit, 
    bcm_ptp_stack_id_t ptp_id, 
    int clock_num, 
    int signal_output_id);

#endif /* defined(INCLUDE_PTP) */

#endif /* BCM_HIDE_DISPATCHABLE */

#endif /* __BCM_PTP_H__ */
